
//
// 130419 - AH - Created.
//

package org.japril.servlet.xmlservlet;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.japril.servlet.WebAppUser;

/**
 * <p>
 *   Interface for objects that handles response by an
 *   {@link XmlRequestServlet}.
 * </p>
 * @author Arne Halvorsen (AH)
 */
public interface ResponseHandler
{
  /**
   * <p>
   *   Perform response.
   * </p>
   * @param wau  Represents end user doing request, may be {@code null}. 
   * @param xml  XML received.
   * @param o    Object
   *             {@link EnvironmentInitializer} produced, may be {@code null}.
   * @param resp {@link HttpServletResponse}.
   * @throws IOException If fails.
   */
  void perform(WebAppUser user, String xml, Object o, HttpServletResponse resp)
    throws IOException;
  
}
